home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / gcc / gcc261c.zoo / objects / ConnectedCoder.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-18  |  1.8 KB  |  67 lines

  1. /* Interface for coder object for distributed objects
  2.    Copyright (C) 1994 Free Software Foundation, Inc.
  3.    
  4.    Written by:  R. Andrew McCallum <mccallum@gnu.ai.mit.edu>
  5.    Date: July 1994
  6.    
  7.    This file is part of the GNU Objective C Class Library.
  8.  
  9.    This library is free software; you can redistribute it and/or
  10.    modify it under the terms of the GNU Library General Public
  11.    License as published by the Free Software Foundation; either
  12.    version 2 of the License, or (at your option) any later version.
  13.    
  14.    This library is distributed in the hope that it will be useful,
  15.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  17.    Library General Public License for more details.
  18.    
  19.    You should have received a copy of the GNU Library General Public
  20.    License along with this library; if not, write to the Free
  21.    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22.    */ 
  23.  
  24. #ifndef __ConnectedCoder_h
  25. #define __ConnectedCoder_h
  26.  
  27. #include <objects/stdobjects.h>
  28. #include <objects/BinaryCoder.h>
  29.  
  30. /* ConnectedCoder identifiers */
  31. #define METHOD_REQUEST 0
  32. #define METHOD_REPLY 1
  33. #define ROOTPROXY_REQUEST 2
  34. #define ROOTPROXY_REPLY 3
  35. #define CONNECTION_SHUTDOWN 4
  36. #define METHODTYPE_REQUEST 5    /* these two only needed with NeXT runtime */
  37. #define METHODTYPE_REPLY 6
  38.  
  39. @class Connection;
  40.  
  41. @interface ConnectedCoder : BinaryCoder
  42. {
  43.   Connection *connection;
  44.   unsigned sequence_number;
  45.   int identifier;
  46.  
  47.   /* only used for incoming ConnectedCoder's */
  48.   id remotePort;
  49. }
  50.  
  51. + newEncodingWithConnection: (Connection*)c
  52.    sequenceNumber: (int)n
  53.    identifier: (int)i;
  54. + newDecodingWithConnection: (Connection*)c
  55.    timeout: (int) timeout;
  56. - dismiss;
  57.  
  58. - connection;
  59. - (unsigned) sequenceNumber;
  60. - (int) identifier;
  61.  
  62. - remotePort;
  63.  
  64. @end
  65.  
  66. #endif /* __ConnectedCoder_h */
  67.